Optimal. Leaf size=30 \[ \frac {a \log (1-\cos (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {3957, 2915, 12,
36, 31, 29} \begin {gather*} \frac {a \log (1-\cos (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 29
Rule 31
Rule 36
Rule 2915
Rule 3957
Rubi steps
\begin {align*} \int \csc (c+d x) (a+a \sec (c+d x)) \, dx &=-\int (-a-a \cos (c+d x)) \csc (c+d x) \sec (c+d x) \, dx\\ &=\frac {a \text {Subst}\left (\int \frac {a}{(-a-x) x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^2 \text {Subst}\left (\int \frac {1}{(-a-x) x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac {a \text {Subst}\left (\int \frac {1}{-a-x} \, dx,x,-a \cos (c+d x)\right )}{d}-\frac {a \text {Subst}\left (\int \frac {1}{x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a \log (1-\cos (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(63\) vs. \(2(30)=60\).
time = 0.03, size = 63, normalized size = 2.10 \begin {gather*} -\frac {a \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a (\log (\cos (c+d x))-\log (\sin (c+d x)))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 15, normalized size = 0.50
method | result | size |
derivativedivides | \(\frac {a \ln \left (-1+\sec \left (d x +c \right )\right )}{d}\) | \(15\) |
default | \(\frac {a \ln \left (-1+\sec \left (d x +c \right )\right )}{d}\) | \(15\) |
risch | \(\frac {2 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(38\) |
norman | \(\frac {2 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(54\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 26, normalized size = 0.87 \begin {gather*} \frac {a \log \left (\cos \left (d x + c\right ) - 1\right ) - a \log \left (\cos \left (d x + c\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.66, size = 31, normalized size = 1.03 \begin {gather*} -\frac {a \log \left (-\cos \left (d x + c\right )\right ) - a \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \csc {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \csc {\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 58, normalized size = 1.93 \begin {gather*} \frac {a \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.12, size = 17, normalized size = 0.57 \begin {gather*} \frac {2\,a\,\mathrm {atanh}\left (1-2\,\cos \left (c+d\,x\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________